from random import shuffle
def create_cross_validation_idxs(num_samples = 50, num_folds = 10):
    '''
    This method returns a list of lists of indices, making up a *partition* of the input range (num_num_samples)
    '''
    fold_size = num_samples/num_folds
    total_indices = range(num_samples)
    shuffle(total_indices)

    folds = []
    for i in range(0, len(total_indices), fold_size):
        fold = total_indices[i:i + min(fold_size, len(total_indices) - i)]
        folds.append(fold)
    return folds